Session - Images
The NHS-R Community logo taken from the GitHub repository directly
{knitr} and code chunksThe Visual editor is great for WSIWYG (what you see is what you get) and the code that’s generated can be seen in Source:
example_report.qmd in folder images_report/
/ then imagebakers1.png
Source
08:00
In markdown (Source view) linking to an image in the same area as the .qmd file is straightforward, as is going to a subfolder
Useful things to know
/ after a folder will show what’s in that folderSource view we’ll link to an image in the same folder by putting the cursor between () and clicking Tab/ and then TabShow inline
Ctrl + Shift + F10
Using the drop down menu with a cog, found next to the blue arrow with Render
Preview Images and Equations
will not be ticked, selecting this will allow Quarto to show the image in the report script.
Alternative text is predominately for people using screen readers to explain images but is very useful when images break:
Code should be 
Rendered image doesn’t work but the text shows

Text appears between {} that comes after the link:
{fig-alt="Three green fuzzy monsters in chef hats stand on top of one another, with the one on top pouring flour into a mixing bowl."}Appears after alt="" code:
<div id="bakeoff">
<img src="img/bakers_3.png" alt="Alt text:Three green fuzzy monsters in chef hats stand on top of one another, with the one on top pouring flour into a mixing bowl.">
</div> {knitr}
Code used in R chunks
Markdown doesn’t support resizing and html requires knowledge of a different language but using {knitr} and Quarto options:
{knitr} in a code chunk can change where the image appears on the page:
How do you add headers in Markdown?
! Header
- Header
# Header
1. Header
Answer: Headers is # hash
What about lists? Bulleted? Numbered?
! Item 1
- Item 1
# Item 1
1. Item 1
Lists are - for bullets and 1. for numbered
Artwork from Allison Horst “Illustrations from Hadley Wickham’s ACM talk”The Joy of Functional Programming (for Data Science).” https://allisonhorst.com/wickham-tidy-bakers